/*
 * Author: 李波（Edwin Lee)
 * Date: 2024-06-16 20:34:10
 * FilePath: /chat/include/server/usermodel.h
 * LastEditTime: 2024-06-19 11:09:16
 * version: 1.0
 * Description: 
 */
#ifndef USERMODEL_H
#define USERMODEL_H
#include "user.hpp"

//description: User表的数据操作类
//Date: 2024-06-16 20:36:22
class UserModel
{
public:
    //description: User表的增加方法
    //param user: 添加的User数据
    //return {void}
    //Date: 2024-06-16 20:37:10
    bool insert(User& user);

    //description: 数据查询
    //param id: user表的id字段
    //return {void}
    //Date: 2024-06-17 12:40:56
    User query(int id);

    //description: 更新用户状态信息
    //param user: 新的信息
    //return {void}
    //Date: 2024-06-17 14:17:37
    bool updateState(User user);

    //description: 重置用户状态为offline
    //Date: 2024-06-19 11:08:33
    void resetState();
private:
};


#endif